package com.hzw.saas.web.sso.pojo.param;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author sonam
 * @since 2021/3/1 14:52
 */
@Data
@ApiModel(value = "创建客户端信息参数")
public class SaasClientParam {

    @NotBlank(message = "应用名称不能为空")
    @ApiModelProperty(name = "应用名称")
    private String name;

    @NotBlank(message = "重定向地址不能为空")
    @ApiModelProperty(name = "重定向地址")
    private String redirectUri;

    @NotBlank(message = "应用主页")
    @ApiModelProperty(name = "应用主页")
    private String homeUri;

    @ApiModelProperty(value = "资源服务器ID，逗号分割")
    private List<String> resourceIds;

    @ApiModelProperty(value = "刷新token有效时长，单位：s")
    private Integer refreshTokenValidity;

    @ApiModelProperty(value = "token有效时长，单位：s")
    private Integer accessTokenValidity;

    @ApiModelProperty(value = "客户端被授权的授权类型,包括password,authorization_code,refresh_token")
    private List<String> authorizedGrantTypes;
}
